package com.ulic.customerManApplication.commonmodule.service;

import java.util.List;

import com.ulic.customerManApplication.commonmodule.bo.Organization;
import com.ulic.customerManApplication.usermodule.bo.User;

public interface OrganizationService {

	public List<Organization> getOrganizations();
	
	public List<Organization> getOrganizations(String roleName,User user);
	
	public Organization getOrganizationByUMID(String um_organ_id);
	
	public Organization getOrganizationByFullName(String fullName);
	
	/**
	 * Description: 获得终极父机构
	 * @Version1.0 
	 * 2012-9-7 下午05:01:10 李求智 (liqz@huilan.com) created
	 * @return
	 */
	public Organization getFinalOrganization();
	
	/**
	 * Description: 根据父id获得子机构
	 * @Version1.0 
	 * 2012-9-7 下午05:01:12 李求智 (liqz@huilan.com) created
	 * @param parentId
	 * @return
	 */
	public List<Organization> findOrganizationByParentId(String parentId);
	
	/**
	 * Description: 判断机构是否包含用户
	 * @Version1.0 
	 * 2012-9-7 下午05:14:58 李求智 (liqz@huilan.com) created
	 * @param id
	 * @return
	 */
	public boolean organIncludeUser(String id);
	/**
	 * Description: 判断是否是中支
	 * @Version1.0 
	 * 2012-9-10 下午03:17:14 李求智 (liqz@huilan.com) created
	 * @param id
	 * @return
	 */
	public boolean organIsExpensed(String id,String parentid);
	
	/**
	 * Description: 查询用户所在的分公司
	 * @Version1.0 
	 * 2012-9-12 下午04:58:47 李求智 (liqz@huilan.com) created
	 * @param userOid
	 * @return
	 */
	public Organization getBranchByUserOid(String organOid);
	
	/**
	 * Description: 查询用户所在的中支
	 * @Version1.0 
	 * 2012-9-12 下午04:59:39 李求智 (liqz@huilan.com) created
	 * @param userOid
	 * @return
	 */
	public Organization getExpensedByUserOid(String organOid,String organOid1);
	
	public void reloadOrganizationTree();

	
	public void getOrgansBySubCityId(String organOid);
}
